<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="node_modules/jquery/dist/jquery.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			#box,#box2{
				width: 200px;
				height: 100px;
				border: 2px solid red;
			}
		</style>
	</head>
	<body>
		<div id="box">
			内容
		</div>
		<button id="btn">移动</button>
		<div id="box2">
			
		</div>
		<script type="text/javascript">
// 			var box1 = document.getElementById("box");
// 			var box2 = document.getElementById("box2");
// 			var btn = document.getElementsByTagName("button")[0];
// 			btn.onclick = function  () {
// 				box2.innerHTML = box1.innerHTML;
// 				box1.innerHTML = "";
// 			}
            //$("#box2") --------------var box2 = document.getElementById("box2");
			//.html---------------.innerHTML
			//.siblings  表示选择兄弟元素  在里面传入div,表示兄弟元素中所有为div的元素
			
			$("button").click(function  () {
				$("#box2").html($("#box").html()).siblings("div").html("")
			})
		</script>
	</body>
</html>
